package com.viknix.threadpool.manager.http.request;

import com.viknix.threadpool.manager.http.model.RequestHttpEntity;
import com.viknix.threadpool.manager.http.response.HttpClientResponse;

import java.io.Closeable;
import java.net.URI;

/**
 * @Author: Dongqi
 * @Date: 2021/11/22 10:57
 * @Version 1.0
 * @Description: Represents a client-side HTTP request. Created via an implementation execute.
 */
public interface HttpClientRequest extends Closeable {
    
    /**
     * execute http request.
     *
     * @param uri               http url
     * @param httpMethod        http request method
     * @param requestHttpEntity http request entity
     * @return HttpClientResponse
     * @throws Exception ex
     */
    HttpClientResponse execute(URI uri, String httpMethod, RequestHttpEntity requestHttpEntity) throws Exception;
}
